package com.fusetech.flow.audit.service.dto;


import com.fusetech.os.core.query.Query;
import com.fusetech.os.core.query.QueryType;
import com.fusetech.os.core.service.dto.BaseDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 当前审核表DTO
 * @author Liuwq
 * @version 2023-05-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CurrentAuditNodeDTO extends BaseDTO {

	private static final long serialVersionUID = 1L;

	        
	/**
     * 下个节点
     */
	@Query(tableColumn = "a.nextNode", javaField = "nextNode.id", type = QueryType.EQ)
	/*@ExcelProperty(value = "下个节点", converter = ExcelFieldDTOConverter.class)
	@ExcelFieldProperty(value = "nextNode.id", service =  "com.zxhy.service.erp.audit.service.AuditNodeService", wrapper= "com.zxhy.service.erp.audit.service.mapstruct.AuditNodeWrapper")*/
	private AuditNodeDTO nextNode;
	        
	/**
     * 下个节点步骤数
     */
	/*@ExcelProperty("下个节点步骤数")*/
	private String nextNodeNum;
	        
	/**
     * 节点
     */
	@Query(tableColumn = "a.auditNode", javaField = "auditNode.id", type = QueryType.EQ)
	/*@ExcelProperty(value = "节点", converter = ExcelFieldDTOConverter.class)
	@ExcelFieldProperty(value = "", service =  "com.zxhy.service.erp.audit.service.AuditNodeService", wrapper= "com.zxhy.service.erp.audit.service.mapstruct.AuditNodeWrapper")*/
	private AuditNodeDTO auditNode;
	        
	/**
     * 节点ID
     */
	@NotNull(message="节点ID不能为空")
	/*@ExcelProperty("节点ID") */
	private String nodeId;
	        
	/**
     * 配置审核主流程
     */
	/*@ExcelProperty(value = "配置审核主流程", converter = ExcelFieldDTOConverter.class)
	@ExcelFieldProperty(value = "", service =  "com.zxhy.service.erp.audit.service.AuditProcessService", wrapper= "com.zxhy.service.erp.audit.service.mapstruct.AuditProcessWrapper")*/
	private AuditProcessDTO auditProcess;
	        
	/**
     * 文档名称
     */
	@Query(tableColumn = "a.document", javaField = "document", type = QueryType.LIKE)
	/*@ExcelProperty("文档名称") */
	private String document;
	        
	/**
     * document_id
     */

	private String documentId;
	        
	/**
     * 文档类型（进入审核流程的文档类型即from_type,目前只能做成字典中）
     */
	@Query(tableColumn = "a.document_type", javaField = "documentType", type = QueryType.EQ)
	/*@ExcelProperty("文档类型（进入审核流程的文档类型即from_type,目前只能做成字典中）") */
	private String documentType;

	/**
	 * 开始创建日期 查询用
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date beginCreateDate;

	/**
	 * 最终创建日期 查询用
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date endCreateDate;

	/**
	 * 组织机构Id
	 */
	/*@Query(tableColumn = "a.org", javaField = "org.id", type = QueryType.EQ)
	@ExcelProperty(value = "组织机构Id", converter = ExcelFieldDTOConverter.class)
	@ExcelFieldProperty(value = "org.name", service =  "com.zxhy.service.erp.housenum.service.SysOrgService", wrapper= "com.zxhy.service.erp.housenum.service.mapstruct.SysOrgWrapper")
	private SysOrgDTO org;*/

	/**
	 * 部门Id
	 */
	/*@Query(tableColumn = "a.office", javaField = "office.id", type = QueryType.EQ)
	//@ExcelProperty(value = "部门Id", converter = ExcelOfficeDTOConverter.class)
	private SysOfficeDTO office;*/

	/**
	 * 职务Id
	 */
	/*@Query(tableColumn = "a.post", javaField = "post.id", type = QueryType.EQ)
	@ExcelProperty(value = "职务Id", converter = ExcelFieldDTOConverter.class)
	@ExcelFieldProperty(value = "post.name", service =  "com.zxhy.service.erp.housenum.service.SysPostService", wrapper= "com.zxhy.service.erp.housenum.service.mapstruct.SysPostWrapper")
	private SysPostDTO post;*/
}
